package com.x.consumer;

import com.x.Person;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(consumerGroup = "consumer-grp-02", topic = "TEST-TOPIC-01")
public class PersonMqListener2 implements RocketMQListener<Person> {
    @Override
    public void onMessage(Person person) {
        System.out.println("2接收到消息，开始消费2..name:" + person.getName() + ",age:" + person.getAge());
    }
}
